//  定义一个初始状态
const initialState = {
    // 用户基本信息
    user: {},
}

// 操作 Token 状态信息的 reducer 函数
export const profile = (state = initialState, action) => {
    // console.log(action, 'action')
    let { type, payload } = action
    switch (type){
        case 'profile/user':
            return {...state, user:{...payload}}
        default:
            return state
    }
}